<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>用户注册</title>
    <link rel="stylesheet" href="css/reg.css">
</head>
<body>
    <div class = "box">
        <h2>用户注册</h2>
        <form action="RegServlet" method="post" name="reg_form">
            <div class="form-group">
                <label for="username">用户名： </label>
                <input type="text" name="username" id="username" value="${userupdate.username}"/>
            </div>
            <div class="form-group">
                <label for="password"> 密码： </label>
                <input type="password" name="password" id="password" required="true" value="${userupdate.password}"/>
            </div>

            <div class="form-group">
                <div class="col-sm-2">
                </div>
                <div class="col-sm-6">
                    <span>${formBean.errors.username}</span>
                </div>
            </div>

            <div class="form-group">
                <label for="repassword"> 确认密码： </label>
                <input type="password" name="repassword" id="repassword" value="${userupdate.password}"/>
            </div>
            <div class="form-group">
                <label for="truename"> 姓名： </label>
                <input type="text" name="truename" id="truename" value="${userupdate.truename}"/>
            </div>
            <div class="form-group">
                <label>性别：</label>
                <div class="form-line">
<%--                    <input type="radio" value="男" name="gender"  <c:if test="${userupdate.gender == '男'}">checked</c:if> />男--%>
<%--                    <input type="radio" value="女" name="gender"  <c:if test="${userupdate.gender == '女'}">checked</c:if> />女--%>
                    <input class="radio-inline" type="radio" value="男" name="gender"  <c:if test="${userupdate.gender == '男'}">checked</c:if> />男
                    <input class="radio-inline" type="radio" value="女" name="gender" <c:if test="${userupdate.gender == '女'}">checked</c:if> />女
                </div>
            </div>
            <div class="form-group">
                <label for="phone"> 电话：</label>
                <input type="text" name="phone" id="phone" value="${userupdate.phone}"/>
            </div>
            <div class="form-group">
                <label for="email"> 邮箱：</label>
                <input type="email" name="email" id="email"  value="${userupdate.email}"/>
            </div>
            <div class="form-group">
                <label for="card"> 证件类型：</label>
                <select name="card" id="card">
                    <option value="居民身份证" <c:if test="${userupdate.card == '居民身份证'}">selected</c:if>>居民身份证</option>
                    <option value="港澳台通行证" <c:if test="${userupdate.card == '港澳台通行证'}">selected</c:if>>港澳台通行证</option>
                    <option value="护照" <c:if test="${userupdate.card == '护照'}">selected</c:if>>护照</option>
                    <option value="其他" <c:if test="${userupdate.card == '其他'}">selected</c:if>>其他</option>
                </select>
            </div>
            <div class="form-group">
                <label for="cardNo"> 证件号码：</label>
                <input type="text" name="cardNo" id="cardNo" value="${userupdate.cardNo}" />
            </div>
            <input type="hidden" name="id" value="${userupdate.id}">
            <div class="form-group">
                <label for="valcode"> 验证码：</label>
                <input type="text" name="valcode" id="valcode" />
            </div>
            <div class="btn-box">
                <div>
                    <button type="submit">提交</button>
                    <button type="reset">重置</button>
                </div>
            </div>
        </form>
    </div>
</body>
</html>